_nav.js ➔ ???   B
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 92
Code Lines 73

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 73
nc 1
nop 4
dl 0
loc 92
c 0
b 0
f 0
cc 1
rs 7.8836

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
export default (app, i18n, newPostsCount, pendingPostsCount) => {
0 ignored issues
show
Unused Code introduced by
The parameter newPostsCount is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Unused Code introduced by
The parameter pendingPostsCount is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
2
  return [
3
    {
4
      name: i18n.t('labels.admin.campaigns.title'),
5
      url: '/campaigns',
6
      icon: 'fe fe-list',
7
      access: true
8
    },
9
    {
10
      name: i18n.t('labels.admin.payments.title'),
11
      url: '/payments',
12
      icon: 'fe fe-dollar-sign',
13
      access: true
14
    },
15
    {
16
      divider: true,
17
      access: true
18
    },
19
    {
20
      title: true,
21
      name: i18n.t('labels.admin.rightMenu.divider.configuration'),
22
      access: true
23
    },
24
    {
25
      name: 'Payment systems',
26
      url: '/paymentSystems',
27
      icon: 'fe fe-settings',
28
      access: true
29
    },
30
    {
31
      divider: true,
32
      access: true
33
    },
34
    {
35
      name: 'Layout',
36
      url: '/layout',
37
      icon: 'fe fe-settings',
38
      access: true
39
    },
40
    {
41
      divider: true,
42
      access: true
43
    },
44
    {
45
      name: 'Notificatons',
46
      url: '/notifications',
47
      icon: 'fe fe-settings',
48
      access: true
49
    },
50
    {
51
      divider: true,
52
      access: true
53
    },
54
    {
55
      title: true,
56
      name: i18n.t('labels.admin.rightMenu.divider.access'),
57
      access: true
58
    },
59
    {
60
      name: i18n.t('labels.admin.users.title'),
61
      url: '/users',
62
      icon: 'fe fe-users',
63
      access: true
64
    },
65
    {
66
      divider: true,
67
      access: true
68
    },
69
    {
70
      title: true,
71
      name: i18n.t('labels.admin.rightMenu.divider.help'),
72
      access: true
73
    },
74
    {
75
      name: i18n.t('labels.admin.help.title'),
76
      url: '/help',
77
      icon: 'fe fe-help-circle',
78
      access: true
79
    },
80
    {
81
      title: true,
82
      name: i18n.t('labels.admin.rightMenu.divider.feedback'),
83
      access: true
84
    },
85
    {
86
      name: i18n.t('labels.admin.feedback.title'),
87
      url: '/feedback',
88
      icon: 'fe fe-tag',
89
      access: true
90
    }
91
  ]
92
}
93